home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 316 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.7 KB

  1. From: dirk@becker.adviser.com (Dirk Becker)
  2. Message-ID: <v01530502ad4230963778@[194.163.74.11]>
  3. X-Original-Date: Sat, 10 Feb 1996 13:42:32 +0100
  4. Path: in1.uu.net!bounce-back
  5. Date: 10 Feb 96 15:38:57 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. Newsgroups: comp.std.c++
  9. X-Sender: dirk@194.163.74.12
  10. Content-Type: text/plain; charset="us-ascii"
  11. Subject: Re: Make type_info name() distinct?
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMRy8IuEDnX0m9pzZAQFapwF/YiIKAUSG+DMGukLQqoOF+z8V6f+KIcFH
  14.     HrMO1QCsvoKC9ZRgxWrMSNllP3oARgMr
  15.     =M3Fu
  16.  
  17. In article <4fdsql$e6m@jabba.lehman.com>, ajay@lehman.com (Ajay Kamdar) wrote:
  18.  
  19. [Snip]
  20.  
  21. > The compiler generates all this meta data for itself, and unfortunately
  22. > throws it all away rather than allowing access to it
  23. > programmatically. With in the last five years I have worked on three
  24. > separate projects where the availability of meta data from
  25. > the compiler itself would have saved us very significant amounts of
  26. > time and money inventing elaborate meta data generation mechanisms of
  27. > our own.
  28. >
  29. > I don't remember any discussion in this forum as to why the standards
  30. > committee limited RTTI information to its current form. Did the
  31. > committee ever consider standardizing more detailed RTTI?
  32. > Were there technical problems which prevented such standardization?
  33.  
  34. A better support of persistence was also the intention of my original post.
  35. But I did not ask for the additional information in RTTI because I knew
  36. already the reason:
  37.  
  38. This wide RTTI would allow anybody with a decent disassembler to reverse-
  39. engineer your valuable data structures, including full member variable
  40. names. This cannot be acceptable for a general-purpose (not only persistence)
  41. feature.
  42.  
  43. Most compilers have an option to generate your extended information,
  44. either as a MAP file or for symbolic debugger support. So you can extract
  45. your information and include it yourself, if you want.
  46.  
  47. The distinct name()s (at least for class objects) are still needed to get
  48. the connection to the external information. I use a compiler which emits
  49. perfectly mangled symbols for the debugger, but RTTI gives only a short
  50. version of this (inner name of nested class). So you have no chance to
  51. differentiate between list<foo>::iterator and vector<bar>::iterator, because
  52. all you get is "iterator".
  53.  
  54.  
  55. Dirk
  56.  
  57. ------------------------------------------------------------------
  58. Dirk Becker                                dirk@becker.adviser.com
  59. Harderweg 76, 22549 Hamburg, Germany          Tel. +49 40 80783143
  60. ---
  61. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  62.   Contact address: std-c++-request@ncar.ucar.edu.  Moderation policy:
  63.   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  64.